package com.jsb.laundry.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 帖子评论表
 * @TableName jsb_post_comments
 */
@TableName(value ="jsb_post_comments")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "帖子评论对象")
public class JsbPostComments implements Serializable {
    /**
     * 自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "评论的帖子id", dataType = "int")
    private Integer postId;

    @ApiModelProperty(value = "评论用户id", dataType = "string")
    private String userId;

    @ApiModelProperty(value = "评论内容", dataType = "string")
    private String content;

    @ApiModelProperty(value = "点赞数", dataType = "int")
    private Integer likes;

    @ApiModelProperty(value = "创建时间", dataType = "data")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @ApiModelProperty(value = " 更新时间", dataType = "data")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}